package com.lee.controller;

import com.lee.entity.ResponseWrapper;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * TODO
 *
 * @className: BaseController
 * @author: lx
 * @date: 2021-02-07
 **/
public class BaseController {


    @ExceptionHandler(value = {RuntimeException.class})
    ResponseEntity exception() {
        return new ResponseEntity(ResponseWrapper.exception().build(), HttpStatus.OK);
    }


}
